import fetch from 'common/src/utils/fetch'


/**
 * 删除
 */
function delete_(idList) {
    return fetch({
        url: '/api/electionservice/electionRound',
        method: 'delete',
        data: idList
    });
}
/**
 * 根据ID查询轮次信息
 */
function get(roundId) {
    return fetch({
        url: `/api/electionservice/electionRound/${roundId}`,
        method: 'get'
    });
}

/**
 * 修改
 */
function update(template) {
    return fetch({
        url: '/api/electionservice/electionRound',
        method: 'post',
        data: template
    });
}

/**
 * 新增
 */
function add(template) {
    return fetch({
        url: '/api/electionservice/electionRound',
        method: 'put',
        data: template
    });
}

/**
 * 查询列表
 */
function searchList(data) {
    return fetch({
        url: '/api/electionservice/electionRound/page',
        method: 'post',
        data: data
    });
}

function pageTj(data) {
    return fetch({
        url: '/api/electionservice/electionRound/pageTj',
        method: 'post',
        data: data
    });
}

/**
 * 查询筛选标签字典
 */
function selectLabelName(data) {
    return fetch({
        url: '/api/electionservice/rebuildCourse/selectLabelName?calendarId=' + data,
        method: 'get',
        data: data
    });
}

/**
 * 查询选课轮次字典
 */
function selectTurn(data) {
    return fetch({
        url: '/api/electionservice/rebuildCourse/selectTurn',
        method: 'post',
        data: data
    });
}

/**
 * 删除选课回收站
 */
function deleteRecycleCourse(data) {
    return fetch({
        url: '/api/electionservice/rebuildCourse/deleteRecycleCourse',
        method: 'post',
        data: data
    });
}

/**
 * 查询筛选标签字典
 */
function selectScreenLabelName(data) {
    return fetch({
        url: '/api/electionservice/rebuildCourse/selectScreenLabelName?calendarId=' + data,
        method: 'get',
        data: data
    });
}


export default {
    "delete_": delete_,
    "get": get,
    "update": update,
    "add": add,
    "searchList": searchList,
    "selectLabelName": selectLabelName,
    "selectTurn": selectTurn,
    "deleteRecycleCourse": deleteRecycleCourse,
    "pageTj": pageTj,
    "selectScreenLabelName":selectScreenLabelName
}